﻿using hlog;
using hq;


using MongoDB.Bson;
using MongoDB.Driver.Builders;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace htask {
    public class MongoLogTask : ZtTask {


        IMServer mServer = GuidangFactray.getDal<IMServer>();
        protected override bool init() {
            time = 1000;
            return true;
        }
      
        public override void excute() {
            Dictionary<string ,List<BaseMongoLog>> dict = GuidangCache.getAllMongoData();
            foreach( var t in dict ) {
                mServer.InsertBatch(t.Value);
            }
        }
        
       
    }
}
     